package com.java.Enum;

/**
 * @Author: ZhangJin
 * @Date: 2020/9/19 22:09
 */
public enum AreaAccess {

    spacialSmall("特小型"),
    small("小型"),
    LowerMiddle("中等偏下"),
    Middle("中等"),
    UpperMiddle("中等偏上"),
    Big("大型"),
    Large("超大型"),
    Null("没有类型")
    ;


    private String Type;

    AreaAccess(String type){
        Type = type;
    }

    public String getType() {
        return Type;
    }

    public void setType(String type) {
        Type = type;
    }

    public static AreaAccess getTypeBtArea(Double Area){

        if (Area < 50){
            return spacialSmall;
        }else if (Area >= 50 && Area < 100){
            return  small;
        }else if (Area >= 100 && Area < 200){
            return LowerMiddle;
        }else if (Area >= 200 && Area < 300){
            return Middle;
        }else if (Area >= 300 && Area < 500){
            return UpperMiddle;
        }else if (Area >= 500 && Area < 800){
            return Big;
        }else if (Area >= 800){
            return Large;
        }

        return  Null;

    }

}
